package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.SystemLogQueryObject;
import cn.wolfcode.crm.service.ISystemLogService;
import cn.wolfcode.crm.util.PageResult;
import cn.wolfcode.crm.util.PermissionName;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("systemLog")
public class SystemLogController {
    @Autowired
    private ISystemLogService systemLogService;


    @RequestMapping("")
    public String index(){
        return "systemLog/list";
    }

    @PermissionName("日志列表")
    @RequiresPermissions("systemLog:list")
    @RequestMapping("list")
    @ResponseBody
    public PageResult list(SystemLogQueryObject qo){
        return systemLogService.query(qo);
    }
}
